package com.wen.springcloud.dubbo.controller;

import com.wen.springcloud.dubbo.api.ISayHelloService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("consumer")
public class ConsumerController {
    @DubboReference(version = "2.0")
    private ISayHelloService service;

    @GetMapping("sayHello")
    public String sayHello() {
        //gittest
        return service.say("Hello World!");
    }
}
